//统一管理用户相关接口
import request from '@/utils/request';
import{
    loginFormData,
    loginResponseData,
    userInfoReponseData,
    registerFormData
} from './type'
enum API{
    LOGIN_URL ='/user/login',
    USERINFO_URL= '/user/info',
    LOGOUT_URL = '/admin/acl/index/logout',
    REGISTER_URL = '/user/register'  
}

export const reqLogin =(data:loginFormData)=>
    request.post<any,loginResponseData>(API.LOGIN_URL,data);



//注册用户
export const reqRegister = (data:registerFormData) =>request.post<any,registerFormData>(API.REGISTER_URL,data)


//退出登录   
 export const reqLogou = () =>request.post<any,any>(API.LOGIN_URL)
